﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using FAQFrameworks;

/// <summary>
///ExceptionMoudle 的摘要说明
/// </summary>
public class ExceptionModule : IHttpModule
{
    public ExceptionModule()
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
    }

    #region IHttpModule 成员

    public void Dispose()
    {
        //throw new NotImplementedException();
    }

    public void Init(HttpApplication context)
    {
        context.Error += new EventHandler(context_Error);
    }

    void context_Error(object sender, EventArgs e)
    {
        HttpApplication app = sender as HttpApplication;

        Exception ex = app.Context.Error;

        LoggerManager.Log(ex);
    }

    #endregion
}

